import 'package:fl_chart/fl_chart.dart';
import 'package:sleep/provider/fagigue_state_provider.dart';
import 'package:sleep/provider/sleep_state_provider.dart';

class MerroyDB {
  static MerroyDB? _manger;
  List<FatigueStateModel> fatigueStates = [];
  int? fatigueTime;

  List<SleeptateModel> sleepStates = [];
  int? sleepTime;
  List<FlSpot> turnOverStates = [];
  int? turnOverTime;
  double? sleepValue;
  double? sleepMutile;

  List<Object> sleepHTsates = [];
  int? sleepHtTime;
  double? height;
  double? l;
  int turn = 0;
  int stCount = 0;
  int lowCount = 0;
  int? fatigueStartTime;
  //  int? osashStartTime;
  int? sleepStartTime;
  int? tuoverStartTime;
  MerroyDB._();
  static MerroyDB share() {
    _manger ??= MerroyDB._();
    return _manger!;
  }

  sleepClear() {
    sleepStates.clear();
    sleepTime = null;
    sleepHTsates.clear();
    turnOverTime = null;
    turnOverStates.clear();
    sleepHtTime = null;
    stCount = 0;
    lowCount = 0;
    turn = 0;
  }

  fatigueClear() {
    fatigueStates.clear();
    fatigueTime = null;
    fatigueStartTime = null;
  }
}
